1. Field of the Invention
The present invention relates in general to a ZigBee network device, an address assigning method and a routing method in a ZigBee network environment. More specifically, the present invention relates to a ZigBee network device for assigning consecutive addresses to its child nodes (lower devices) after constructing a cluster-tree structure, an address assigning method, and a routing method in a ZigBee network environment.
2. Description of the Related Art
ZigBee is a mobile communication technology designed to be simpler and less power consuming than other wireless personal area networks (WPANs) such as a Bluetooth network. A ZigBee network generally requires only a half of the costs of a typical Bluetooth network by minimizing software and related parts used, and it is especially ideal for a home network that is mostly involved in control and sensing.
ZigBee Network standard v0.85[1] defines a cluster tree structure gathering all devices within a personal area network (PAN). Every device joined in this cluster tree structure is assigned a unique address of the cluster tree structure. These addresses are used for routing purposes in a ZigBee network environment.
For address assignment, a ZigBee coordinator defines two network parameters, namely Cm and Lm, in consideration of the size of the network. Cm is a maximum number of lower devices (hereinafter referred to as child nodes) that can be linked to a parent node, and Lm is a maximum level (or depth) of the tree structure.
According to a related art address assigning method in a ZigBee network environment, each child node is assigned an address. In this case, the ZigBee coordinator assigns addresses in consideration of a whole range of probabilities of child nodes that it can have. For instance, suppose that the ZigBee coordinator has an address s. Then, the ZigBee coordinator assigns short address s+1 to a first child node, s+1+CskipLs to a second node child, and s+1+2*CskipLs to a third child node. And a Cm-th child node is assigned s+1+(Cm−1)*CskipLs. CskipLs can be expressed by the following equation.
                              C                      skip            Ls                          =                                            B              L                        -                                                                                Q                                          k                      =                      0                                                        Ls                                ⁡                                  (                  Cm                  )                                            k                                            Cm                          Ls              +              1                                                          [                  Equation          ⁢                                          ⁢          1                ]            where BL is an address block size of the whole network, and Ls is a level of the ZigBee coordinator. BL can be calculated using Cm and Lm as follows:
                              B          L                =                              1            -                          Cm                              Lm                +                1                                                          1            -            Cm                                              [                  Equation          ⁢                                          ⁢          2                ]            
The ZigBee coordinator transfers Cm and Lm to each coordinator (or node). Accordingly, using the same address assignment algorithm, each coordinator assigns consecutive addresses to its child nodes.
FIG. 1 is a diagram illustrating a related art ZigBee network environment based on the above-described address assignment algorithm. Referring to FIG. 1, a node A is the ultimate (e.g., root) ZigBee coordinator. The address of the node A is assigned to 0, and Cm and Lm are defined as 4, respectively. The node A has child nodes B, C and D. According to Equation 2, the address block size BL for the ultimate ZigBee coordinator equals to 341. So if the value BL is substituted for the Equation 1, Cskip of the ultimate ZigBee coordinator is obtained, i.e., 85. This means that addresses of the child nodes B, C and D are separated by an 85-bit address space from one another. For instance, the address of the first child node B is 1, the address of the second child node C is 86, and the address of the third child node D is 171. Also, using the second Equation 2, Cskip of each the child nodes B, C and D at the first level (Ls=1) can be calculated, i.e., 21. Therefore, addresses of the child nodes E to G, and I and J at the second level (Ls=2) are separated by a 21-bit address space, respectively.
In the cluster-tree based on the address assignment algorithm of FIG. 1, each node assigns addresses using two predetermined constants Cm and Lm for the whole ZigBee network. That is, each node receives Cm and Lm from its parent node, and assigns addresses to its child nodes using the Equations 1 and 2.
On the other hand, the last child node at the bottom of the tree, that is, no more descendant nodes wait for joining the branch, can be attached to the mid-level of a ZigBee cluster tree. However, the use of the above-described address assignment algorithm for the last child node often results waste of addresses. For instance, if a node E in FIG. 1 is the last descendant node or the bottom of the tree, a block of consecutive addresses {3-28} for child nodes of the node E become useless because the node E does not have any child nodes below it. Therefore, a lot of addresses are wasted and are not efficiently used due to the inflexible address assignment.
Another problem with the above cluster-tree is that if a branch was to be re-attached after having been detached, there is no particular tree recovery algorithm. Especially when the branch is to be attached to another point in the tree different from its original attaching point, a new block of consecutive addresses for the branch has to be assigned.